<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

		<h:outputStylesheet library="style" name="estilo.css" />
		<title>Automed - Sistema de Atendimento Online</title>
		<link rel="shortcut icon" href="#{resource['image:icone2.ico']}" type="image/icon"></link>
	</h:head>
	<h:body onload="if(#{manterPacienteBean.parametro eq 'true'}){confirmacao.show()};verificaDiaConsulta();">
	
	<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>  
	              
	<p:dialog modal="true" widgetVar="statusDialog" resizable="false" header="Carregando..."   
	        draggable="false" closable="false">  
	    <h:graphicImage library="image" name="img_loader.gif"  />  
	</p:dialog>
	
		<h:panelGroup id="container" layout="block">
			<ui:include src="/templates/topo.xhtml" />
			
			<h:panelGroup id="corpo_nicio" layout="block">
				<ui:insert name="corpo">
					<ui:include src="/paginas/welcome.xhtml" />
				</ui:insert>
			</h:panelGroup>
			
			<ui:include src="/templates/rodape.xhtml" />
			
		</h:panelGroup>

		<p:dialog header="Informação" widgetVar="confirmacao" modal="true" height="130" resizable="false">
			<h:panelGroup layout="block" style="text-align:center">
				<br />  
			    <h:outputText value="Paciente cadastrado com sucesso." styleClass="sucesso_consulta" />			    
			    <br />
			    <br />
			    <p:button value="OK" onclick="confirmacao.hide();"/>
		    </h:panelGroup>
		</p:dialog>
		
		<p:dialog header="Login - Acesso restrito" widgetVar="login" modal="true" height="130" resizable="false">
			<h:panelGroup layout="block" style="text-align:center">  
			    <h:outputText value="Paciente cadastrado com sucesso." />
			    <p:button value="OK" onclick="confirmacao.hide();"/>
		    </h:panelGroup>
		</p:dialog>
		
		 
	</h:body>
</html>